package com.xj.oop1;

public class Dog {

    private String name;
    private String color;

    //构造方法的定义： 1.访问修饰符后直接跟方法名   2.方法名必须跟类名相同
    public Dog(String name, String color) {
        this.name = name;
        this.color = color;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getColor() {
        return color;
    }

    public void setColor(String color) {
        this.color = color;
    }
}
